<?php
namespace app\index\controller;

use think\Cache;
use think\Db;
use think\Controller;
use think\Session;

use alidayu_sms\Ali_sms;
use mredis\Mredis;
use vcode\Vcode;


class Column extends Controller
{

    function __construct() {
        parent::__construct();
    }

    //栏目列表
    public function index(){
        $column_id = $request = $this->request->get('id');
        $dao = new \app\model\front\Article();
        $c_dao = new \app\model\admin\Column();
        $data = $c_dao->column_detail($column_id);
        $data['title'] = $data['name'];
        $c_where['status']=1;
        $c_where['column']=$column_id;
        $lists = $dao->get_article_lists($c_where,$sort='id desc',$paginate=10);//查询最新文章
        $this->assign('lists', $lists);
        $this->assign('data', $data);
        return $this->fetch('column/index');
    }

}


